import request from '@/plugins/request';
var pre = '/riskarea';
var testPre = '/test';
if (process.env.NODE_ENV !== "development") {
    pre = '/api/sa/epid-prevention' + pre;
    testPre = '/api/sa/epid-prevention' + testPre;
}

// 查询涉中高风险人员信息
export function getPageForRiskArea(data) {
    return request({
      url: `${pre}/page`,
      method: "post",
      data,
    });
  }

// 保存涉中高风险人员信息
export function saveRiskAreaPerson (data) {
    return request({
        url: `${pre}/save`,
        method: 'post',
        data
    });
}
// 查询涉中高风险人员详情
export function queryRiskAreaDetail (data) {
    return request({
        url: `${pre}/detail${data}`,
        method: 'get',
    });
}
// 查询涉中高风险人员统计详情
export function queryRiskAreaStatisticsDetail (data) {
    return request({
        url: `${pre}/statdetail`,
        method: 'post',
        data
    });
}
// // 删除涉中高风险人员
export function deleteRiskArea (data) {
    return request({
        url: `${pre}/del`,
        method: 'post',
        data
    });
}

//导出
export function exportRiskArea(data) {
    return request({
        url: `${pre}/export`,
        method: 'post',
        responseType: 'blob',
        data
    });
}

//查询代他人报备姓名
export function queryReportorList (data) {
    return request({
        url: `${pre}/reportorlist`,
        method: 'post',
        data
    });
}

// 保存核酸检测信息
export function saveTestInfo (data,chkFrequency) {
    return request({
        url: `${testPre}/save?chkFrequency=${chkFrequency}`,
        method: 'post',
        data
    });
}

// 查询核酸检测信息详情
export function queryTestList (data) {
    return request({
        url: `${testPre}/list`,
        method: 'post',
        data
    });
}

// // 删除核酸检测信息
export function deleteTestInfo (data) {
    return request({
        url: `${testPre}/del`,
        method: 'post',
        data
    });
}
